/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.diego.game.sudoku.design;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.io.IOException;

/**
 * @author diego
 */
public class GameDesign {

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Image block;
    private Image number;
    private TiledLayer NivelMedio;
    private Sprite number1;
    public int number1seq001Delay = 200;
    public int[] number1seq001 = {1, 11, 21};
    private Sprite Number2;
    public int Number2seq001Delay = 200;
    public int[] Number2seq001 = {2, 12, 22};
    private Sprite Number3;
    public int Number3seq001Delay = 200;
    public int[] Number3seq001 = {3, 13, 23};
    private Sprite number4;
    public int number4seq001Delay = 200;
    public int[] number4seq001 = {4, 14, 24};
    private Sprite number5;
    public int number5seq001Delay = 200;
    public int[] number5seq001 = {5, 15, 25};
    private Sprite number6;
    public int number6seq001Delay = 200;
    public int[] number6seq001 = {6, 16, 26};
    private Sprite number7;
    public int number7seq001Delay = 200;
    public int[] number7seq001 = {7, 17, 27};
    private Sprite number8;
    public int number8seq001Delay = 200;
    public int[] number8seq001 = {8, 18, 28};
    private Sprite number9;
    public int number9seq001Delay = 200;
    public int[] number9seq001 = {9, 19, 29};
    private Sprite number0;
    public int number0seq001Delay = 200;
    public int[] number0seq001 = {0, 0, 0, 0, 0};
    //</editor-fold>//GEN-END:|fields|0|

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
    //</editor-fold>//GEN-END:|methods|0|

    public Image getBlock() throws java.io.IOException {//GEN-BEGIN:|1-getter|0|1-preInit
        if (block == null) {//GEN-END:|1-getter|0|1-preInit
            // write pre-init user code here
            block = Image.createImage("/block.png");//GEN-BEGIN:|1-getter|1|1-postInit
        }//GEN-END:|1-getter|1|1-postInit
        // write post-init user code here
        return this.block;//GEN-BEGIN:|1-getter|2|
    }
//GEN-END:|1-getter|2|



    public Image getNumber() throws java.io.IOException {//GEN-BEGIN:|3-getter|0|3-preInit
        if (number == null) {//GEN-END:|3-getter|0|3-preInit
            // write pre-init user code here
            number = Image.createImage("/number.png");//GEN-BEGIN:|3-getter|1|3-postInit
        }//GEN-END:|3-getter|1|3-postInit
        // write post-init user code here
        return this.number;//GEN-BEGIN:|3-getter|2|
    }
//GEN-END:|3-getter|2|

    public TiledLayer getNivelMedio() throws java.io.IOException {//GEN-BEGIN:|4-getter|0|4-preInit
        if (NivelMedio == null) {//GEN-END:|4-getter|0|4-preInit
            // write pre-init user code here
            NivelMedio = new TiledLayer(9, 9, getNumber(), 32, 32);//GEN-BEGIN:|4-getter|1|4-midInit
            int[][] tiles = {
                { 22, 30, 26, 23, 29, 0, 0, 0, 0 },
                { 0, 23, 0, 0, 0, 27, 26, 25, 0 },
                { 0, 0, 24, 0, 28, 0, 0, 0, 0 },
                { 30, 0, 0, 0, 0, 29, 0, 0, 0 },
                { 0, 29, 0, 25, 27, 26, 0, 30, 0 },
                { 0, 0, 0, 24, 0, 0, 0, 0, 22 },
                { 0, 0, 0, 0, 29, 0, 30, 0, 0 },
                { 0, 26, 30, 23, 0, 0, 0, 28, 0 },
                { 0, 0, 0, 0, 0, 28, 22, 23, 25 }
            };//GEN-END:|4-getter|1|4-midInit
            // write mid-init user code here
            for (int row = 0; row < 9; row++) {//GEN-BEGIN:|4-getter|2|4-postInit
                for (int col = 0; col < 9; col++) {
                    NivelMedio.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|4-getter|2|4-postInit
        // write post-init user code here
        return NivelMedio;//GEN-BEGIN:|4-getter|3|
    }
//GEN-END:|4-getter|3|

    public Sprite getNumber1() throws java.io.IOException {//GEN-BEGIN:|5-getter|0|5-preInit
        if (number1 == null) {//GEN-END:|5-getter|0|5-preInit
            // write pre-init user code here
            number1 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|5-getter|1|5-postInit
            number1.setFrameSequence(number1seq001);//GEN-END:|5-getter|1|5-postInit
            // write post-init user code here
        }//GEN-BEGIN:|5-getter|2|
        return number1;
    }
//GEN-END:|5-getter|2|

    public Sprite getNumber2() throws java.io.IOException {//GEN-BEGIN:|7-getter|0|7-preInit
        if (Number2 == null) {//GEN-END:|7-getter|0|7-preInit
            // write pre-init user code here
            Number2 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|7-getter|1|7-postInit
            Number2.setFrameSequence(Number2seq001);//GEN-END:|7-getter|1|7-postInit
            // write post-init user code here
        }//GEN-BEGIN:|7-getter|2|
        return Number2;
    }
//GEN-END:|7-getter|2|

    public Sprite getNumber3() throws java.io.IOException {//GEN-BEGIN:|9-getter|0|9-preInit
        if (Number3 == null) {//GEN-END:|9-getter|0|9-preInit
            // write pre-init user code here
            Number3 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|9-getter|1|9-postInit
            Number3.setFrameSequence(Number3seq001);//GEN-END:|9-getter|1|9-postInit
            // write post-init user code here
        }//GEN-BEGIN:|9-getter|2|
        return Number3;
    }
//GEN-END:|9-getter|2|

    public Sprite getNumber4() throws java.io.IOException {//GEN-BEGIN:|11-getter|0|11-preInit
        if (number4 == null) {//GEN-END:|11-getter|0|11-preInit
            // write pre-init user code here
            number4 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|11-getter|1|11-postInit
            number4.setFrameSequence(number4seq001);//GEN-END:|11-getter|1|11-postInit
            // write post-init user code here
        }//GEN-BEGIN:|11-getter|2|
        return number4;
    }
//GEN-END:|11-getter|2|

    public Sprite getNumber5() throws java.io.IOException {//GEN-BEGIN:|13-getter|0|13-preInit
        if (number5 == null) {//GEN-END:|13-getter|0|13-preInit
            // write pre-init user code here
            number5 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|13-getter|1|13-postInit
            number5.setFrameSequence(number5seq001);//GEN-END:|13-getter|1|13-postInit
            // write post-init user code here
        }//GEN-BEGIN:|13-getter|2|
        return number5;
    }
//GEN-END:|13-getter|2|

    public Sprite getNumber6() throws java.io.IOException {//GEN-BEGIN:|15-getter|0|15-preInit
        if (number6 == null) {//GEN-END:|15-getter|0|15-preInit
            // write pre-init user code here
            number6 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|15-getter|1|15-postInit
            number6.setFrameSequence(number6seq001);//GEN-END:|15-getter|1|15-postInit
            // write post-init user code here
        }//GEN-BEGIN:|15-getter|2|
        return number6;
    }
//GEN-END:|15-getter|2|

    public Sprite getNumber7() throws java.io.IOException {//GEN-BEGIN:|17-getter|0|17-preInit
        if (number7 == null) {//GEN-END:|17-getter|0|17-preInit
            // write pre-init user code here
            number7 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|17-getter|1|17-postInit
            number7.setFrameSequence(number7seq001);//GEN-END:|17-getter|1|17-postInit
            // write post-init user code here
        }//GEN-BEGIN:|17-getter|2|
        return number7;
    }
//GEN-END:|17-getter|2|

    public Sprite getNumber8() throws java.io.IOException {//GEN-BEGIN:|19-getter|0|19-preInit
        if (number8 == null) {//GEN-END:|19-getter|0|19-preInit
            // write pre-init user code here
            number8 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|19-getter|1|19-postInit
            number8.setFrameSequence(number8seq001);//GEN-END:|19-getter|1|19-postInit
            // write post-init user code here
        }//GEN-BEGIN:|19-getter|2|
        return number8;
    }
//GEN-END:|19-getter|2|

    public Sprite getNumber9() throws java.io.IOException {//GEN-BEGIN:|21-getter|0|21-preInit
        if (number9 == null) {//GEN-END:|21-getter|0|21-preInit
            // write pre-init user code here
            number9 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|21-getter|1|21-postInit
            number9.setFrameSequence(number9seq001);//GEN-END:|21-getter|1|21-postInit
            // write post-init user code here
        }//GEN-BEGIN:|21-getter|2|
        return number9;
    }
//GEN-END:|21-getter|2|

    public Sprite getNumber0() throws java.io.IOException {//GEN-BEGIN:|23-getter|0|23-preInit
        if (number0 == null) {//GEN-END:|23-getter|0|23-preInit
            // write pre-init user code here
            number0 = new Sprite(getNumber(), 32, 32);//GEN-BEGIN:|23-getter|1|23-postInit
            number0.setFrameSequence(number0seq001);//GEN-END:|23-getter|1|23-postInit
            // write post-init user code here
        }//GEN-BEGIN:|23-getter|2|
        return number0;
    }
//GEN-END:|23-getter|2|

}
